package com.lening.security.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.security.dao.PointsDAO;
import com.lening.security.dto.PointsDTO;
import com.lening.security.po.PointsPO;
import com.lening.security.service.IPointsService;
import com.lening.common.base.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author 赵子豪
 * @date 2024年06月04日 08时58分18秒
 * 巡更点位
 */
@Slf4j
@Service
public class PointsServiceImpl extends BaseServiceImpl<PointsDAO, PointsPO, PointsDTO> implements IPointsService {
    @Autowired
    private PointsDAO pointsDAO;

    @Value("${file.path}")
    private String filePath;

    @Value("${server.port}")
    private String port;
    //分页
    @Override
    public Page<PointsDTO> pointspage(PointsDTO pointsDTO) {
        return pointsDAO.pointspage(pointsDTO);
    }

    @Override
    public Page<PointsDTO> get(PointsDTO pointsDTO) {
        return pointsDAO.get(pointsDTO);
    }

    //文件上传
//    @Override
//    public Map<String, String> upload(MultipartFile file) {
//        return FileUploadUtil.upload(file,filePath,port);
//    }

    //记录
    @Override
    public Page<PointsDTO> pointsrecordpage(PointsDTO pointsDTO) {
        return pointsDAO.pointsrecordpage(pointsDTO);
    }
    //记录的修改，把空的改为有值
    @Override
    public void pointByid(PointsDTO pointsDTO) {
        pointsDAO.pointByid(pointsDTO);
    }

}